package ch.zbw.swt.sysventory.zzzzRIP;

import java.awt.Color;
import java.awt.Font;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.ListSelectionModel;
import javax.swing.border.LineBorder;

import IMG.GetPath;

public class GUIScanErfolg{

	private JFrame frame;
	
	private JPanel panel;
	
	private JLabel menuTitelLabel;
	private JLabel ipadressLabel;
	private JLabel computerNameLabel;
	
	private JButton back2MenuButton;
	private JButton go2DetailButton;
	
	private ImageIcon backArrow;
	
	private JList scanIPList;
	private JList scannedComputerList;
	
	private  String[] listComputer;


	/**
	 * Create the application.
	 */
	public GUIScanErfolg(String[] arrayList) {
		
		this.listComputer = arrayList;
	}
	
	public GUIScanErfolg(){}

	/**
	 * Initialize the contents of the frame.
	 */
	public void initialize() {
		frame = new JFrame();
		frame.getContentPane().setFont(new Font("Arial", Font.PLAIN, 11));
		frame.getContentPane().setBackground(Color.WHITE);
		frame.setBackground(Color.WHITE);
		frame.setBounds(100, 100, 770, 480);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().setLayout(null);
		frame.setResizable(false);
		frame.setVisible(true);
		
		
		panel = new JPanel();
		panel.setBackground(Color.WHITE);
		panel.setBounds(10, 11, 744, 83);
		frame.getContentPane().add(panel);
		panel.setLayout(null);
		
		backArrow = new ImageIcon(
				GetPath.class.getResource("back.png"));
		
		menuTitelLabel = new JLabel("Scan Erfolgreich");
		menuTitelLabel.setFont(new Font("Impact", Font.PLAIN, 36));
		menuTitelLabel.setBounds(250, 11, 267, 61);
		panel.add(menuTitelLabel);
		
	
	
		back2MenuButton = new JButton(backArrow);
		back2MenuButton.setBackground(Color.WHITE);
		back2MenuButton.setBounds(24, 11, 129, 61);
		back2MenuButton.setBorder(null);
		panel.add(back2MenuButton);
		
		scanIPList = new JList();
		scanIPList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
		scanIPList.setBorder(new LineBorder(new Color(0, 0, 0)));
		scanIPList.setBounds(252, 160, 119, 262);
		
		
		scannedComputerList = new JList();
		scannedComputerList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
		scannedComputerList.setBorder(new LineBorder(new Color(0, 0, 0)));
		scannedComputerList.setBounds(401, 160, 119, 262);
		frame.getContentPane().add(scannedComputerList);
		
		ipadressLabel = new JLabel("IP-Adresse");
		ipadressLabel.setFont(new Font("Impact", Font.PLAIN, 16));
		ipadressLabel.setBounds(401, 129, 119, 30);
		frame.getContentPane().add(ipadressLabel);
		
		computerNameLabel = new JLabel("Computername");
		computerNameLabel.setFont(new Font("Impact", Font.PLAIN, 16));
		computerNameLabel.setBounds(252, 129, 119, 30);
		frame.getContentPane().add(computerNameLabel);
		

	
		
		go2DetailButton = new JButton("Details");
		go2DetailButton.setFont(new Font("Arial", Font.PLAIN, 11));
		go2DetailButton.setBounds(546, 158, 89, 23);
		frame.getContentPane().add(go2DetailButton);
		
		
		//back2MenuButton.addActionListener(this);
		//back2MenuButton.setActionCommand("back2Menu");
		//go2DetailButton.addActionListener(this);
		//go2DetailButton.setActionCommand("go2detail");
		
	}

	
}
